//
//  OTAddEmployeeFooterView.m
//  OT_OC
//
//  Created by yunmian on 2019/7/16.
//  Copyright © 2019 James. All rights reserved.
//

#import "OTAddEmployeeFooterView.h"

@interface OTAddEmployeeFooterView ()
{
    UIButton                *button;
}
@end

@implementation OTAddEmployeeFooterView

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self initUI];
    }
    return self;
}

- (void)initUI {
    
    button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.backgroundColor = UIColor.redColor;
    [button setTitle:@"确认" forState:UIControlStateNormal];
    button.layer.cornerRadius = 10;
    [button addTarget:self action:@selector(onClickButton) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:button];
}

- (void)layoutSubviews {
    
    [super layoutSubviews];
    
    [button mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.mas_equalTo(UIEdgeInsetsMake(10, 40, 10, 40));
    }];
}

#pragma mark Event
- (void)onClickButton {
    if ([self.delegate respondsToSelector:@selector(footerViewDidSelected)]) {
        [self.delegate footerViewDidSelected];
    }
}


@end
